//
//  XSVideoToolBarView.m
//  AudioVideo
//
//  Created by xueshan1 on 2019/11/1.
//  Copyright © 2019 xueshan1. All rights reserved.
//

#import "XSVideoToolBarView.h"

@implementation XSVideoToolBarView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self = [[[NSBundle mainBundle]loadNibNamed:@"XSVideoToolBarView" owner:nil options:nil]firstObject];
        self.frame = frame;
        
        
    }
    return self;
}
- (IBAction)backAction:(id)sender {
    self.selectedBtn = sender;
    if (self.clickBackBtnBlock)  self.clickBackBtnBlock();
}
- (IBAction)audioAction:(id)sender {
    self.selectedBtn = sender;
    if (self.clickaudioBtnBlock)  self.clickaudioBtnBlock();
}
- (IBAction)watermaskBtnACtion:(id)sender {
    self.selectedBtn = sender;
    if (self.clickwatermaskBtnBlock)  self.clickwatermaskBtnBlock();
}
- (IBAction)save:(id)sender {
    self.selectedBtn = sender;
    if (self.clicksaveBtnBlock)  self.clicksaveBtnBlock();
}

- (void)setSelectedBtn:(UIButton *)selectedBtn{
    if (_selectedBtn != selectedBtn) {
        _selectedBtn.selected = NO;
        
        selectedBtn.selected = YES;
        _selectedBtn = selectedBtn;
    }
}


- (void)layoutSubviews{
    [super layoutSubviews];
    
}

@end
